package tankGame02.tank;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-03-01
 * Time:12:05
 */
@SuppressWarnings("unused")
public class Hero extends Tank {
    public Hero(int x, int y) {
        super(x, y);
    }

    public Hero(int x, int y, int direct, int speed) {
        super(x, y, direct, speed);
    }

    public Hero(int x, int y, int direct) {
        super(x, y, direct);
    }

    @Override
    public void move(int direct, int speed) {
        super.setDirect(direct);
        switch (direct) {
            case 0:
                setY(getY() - speed);
                break;
            case 1:
                setX(getX() + speed);
                break;
            case 2:
                setY(getY() + speed);
                break;
            case 3:
                setX(getX() - speed);
                break;
        }
    }
}
